/**
 * @description: 预设规则
 */

import { defHttp } from '@/apis/http'
import type { CommonAPI } from '@/apis/schema/all'

/** 获取预设缓存规则 */
export const getApiPresetCacheRule: CommonAPI<
  '/api/config/preset-cache-rule',
  'get'
> = (params) => defHttp.get(`/api/config/preset-cache-rule`, { params })

/** 设置预设缓存规则 */
export const updateApiPresetCacheRule: CommonAPI<
  '/api/config/preset-cache-rule',
  'put'
> = (data) => defHttp.put(`/api/config/preset-cache-rule`, { data })
